package com.xpalive.config.mybatis.toolkit;

import com.xpalive.utils.beans.XBeanUtils;
import org.apache.commons.lang3.StringUtils;

public interface MyBatisQuery {

    default boolean isNull(Object object) {
        return XBeanUtils.isNull(object);
    }

    default boolean isNotNull(Object object) {
        return XBeanUtils.isNotNull(object);
    }

    default boolean isBlank(Object object) {
        return XBeanUtils.isBlank(object);
    }

    default boolean isNotBlank(Object object) {
        return XBeanUtils.isNotBlank(object);
    }

    default String enumName(Enum<?> enumValue) {
        return enumValue.name();
    }

    default boolean eqStr(String one, String other) {
        return StringUtils.equals(one, other);
    }
}
